package com.fusetech.flow.audit.service.dto;


import com.alibaba.excel.annotation.ExcelProperty;
import com.fusetech.os.core.query.Query;
import com.fusetech.os.core.query.QueryType;
import com.fusetech.os.core.service.dto.BaseDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotNull;

/**
 * 审核记录表DTO
 * @author Liuwq
 * @version 2023-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AuditRecordDTO extends BaseDTO {

	private static final long serialVersionUID = 1L;

	        
	/**
     * 文档类型（进入审核流程的文档类型即from_type,目前只能做成字典中）
     */
    @Query(tableColumn = "a.document_type", javaField = "documentType", type = QueryType.EQ)
	@ExcelProperty("文档类型（进入审核流程的文档类型即from_type,目前只能做成字典中）")
	private String documentType;
	        
	/**
     * 文档名称
     */
    @Query(tableColumn = "a.document", javaField = "document", type = QueryType.LIKE)
	@ExcelProperty("文档名称")
	private String document;
	        
	/**
     * document_id
     */
	@ExcelProperty("document_id")
	private String documentId;
	        
	/**
     * 配置审核主流程
     */
    @Query(tableColumn = "a.audit_process", javaField = "auditProcess.id", type = QueryType.EQ)
	//@ExcelProperty(value = "配置审核主流程", converter = ExcelFieldDTOConverter.class)
	//@ExcelFieldProperty(value = "auditProcess.name", service =  "com.zxhy.service.erp.audit.service.AuditProcessService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditProcessWrapper")
	private AuditProcessDTO auditProcess;
	        
	/**
     * 节点
     */
    @Query(tableColumn = "a.audit_node", javaField = "auditNode.id", type = QueryType.EQ)
	//@ExcelProperty(value = "节点", converter = ExcelFieldDTOConverter.class)
	//@ExcelFieldProperty(value = "", service =  "com.zxhy.service.erp.audit.service.AuditNodeService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditNodeWrapper")
	private AuditNodeDTO auditNode;
	        
	/**
     * 节点ID
     */
	@ExcelProperty("节点ID") 
	private String nodeId;
	        
	/**
     * 审核人
     */
    //@Query(tableColumn = "a.auditor", javaField = "auditor.id", type = QueryType.EQ)
    //@ExcelProperty(value = "审核人", converter = ExcelUserDTOConverter.class)
	//private SysUserDTO auditor;
	private String auditor;
	/**
     * 状态
     */
	@NotNull(message="状态不能为空")
    @Query(tableColumn = "a.status", javaField = "status", type = QueryType.EQ)
	@ExcelProperty("状态") 
	private String status;
	        
	/**
     * 下一节点
     */
	@ExcelProperty("下一节点") 
	private String nextNodeId;
	        
	/**
     * 下一节点ID
     */
	//@ExcelProperty(value = "下一节点ID", converter = ExcelFieldDTOConverter.class)
	//@ExcelFieldProperty(value = "", service =  "com.zxhy.service.erp.audit.service.AuditNodeService", wrapper= "com.zxhy.service.erp.audit.service.mapstruct.AuditNodeWrapper")
	private AuditNodeDTO nextAuditNode;

	@ExcelProperty("备注")
	private String remark;
	@ExcelProperty("审批意见")
	private String comments;
	private String var1;
	private String var2;

	private String appovePer;//发起人
	private String nodeName;//节点名称


	/**
	 * 组织机构Id
	 */
	/*@Query(tableColumn = "a.org", javaField = "org.id", type = QueryType.EQ)
	@ExcelProperty(value = "组织机构Id", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "org.name", service =  "com.zxhy.service.erp.housenum.service.SysOrgService", wrapper= "com.zxhy.service.erp.housenum.service.mapstruct.SysOrgWrapper")
	private SysOrgDTO org;*/

	/**
	 * 部门Id
	 */
	/*@Query(tableColumn = "a.office", javaField = "office.id", type = QueryType.EQ)
	//@ExcelProperty(value = "部门Id", converter = ExcelOfficeDTOConverter.class)
	private SysOfficeDTO office;*/

	/**
	 * 职务Id
	 */
	/*@Query(tableColumn = "a.post", javaField = "post.id", type = QueryType.EQ)
	@ExcelProperty(value = "职务Id", converter = ExcelFieldDTOConverter.class)
	@ExcelFieldProperty(value = "post.name", service =  "com.zxhy.service.erp.housenum.service.SysPostService", wrapper= "com.zxhy.service.erp.housenum.service.mapstruct.SysPostWrapper")
	private SysPostDTO post;*/
}
